package com.phenix.share.superwindow

import android.graphics.Point
import android.view.Gravity
import android.view.View

interface ISuperFloatingWindowCreator {

    fun createContentView(): View

    fun gravity(): Int = Gravity.TOP or Gravity.START

    fun offsetPoint(): Point = Point(0, 0)

    fun autoAttachToEdges(): Boolean = true

    fun showOnConnected(): Boolean = true

    fun dragTarget(contentView: View): View? = contentView

    fun isDraggable() = true

    fun title() = "SuperFloatingWindow"
}

interface ISuperFloatingWindowCallback {

    fun onVisibilityChanged(isShown: Boolean) {}

    fun onWindowSizeChanged(isMini: Boolean) {}

    fun onWindowPositionChanged(x: Int, y: Int) {}

    fun onWindowFocusChanged(hasFocus: Boolean) {}
}